package com.loong.data.controller.backend;

import com.loong.common.mvc.BaseBackendController;
import com.loong.common.rest.Result;
import com.loong.data.common.backend.param.GoodsBrandParam;
import com.loong.data.common.backend.param.PageParam;
import com.loong.data.handler.GoodsBrandHandler;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description: 处理后台有关商品品牌请求的controller
 * @Author: LiuQun
 * @Date: 2020/12/7 9:08
 */
@RestController
@RequestMapping("manage/data/goodsBrand")
public class GoodsBrandController extends BaseBackendController {

    @Resource
    private GoodsBrandHandler goodsBrandHandler;

    /**
     * 分页查询商品品牌
     * @param brandParam 品牌查询参数
     * @param pageParam 分页参数
     * @return 响应的结果
     */
    @PostMapping("pageQuery/goodsBrandList")
    public Result pageQueryGoodsBrandByParam(GoodsBrandParam brandParam, PageParam pageParam){
        return handlerExecutor.execute(() -> goodsBrandHandler.findGoodsBrandByParam(brandParam,pageParam));
    }
}
